package com.hibiscusking.system.mapper;

import com.hibiscusking.system.domain.Permission;
import com.hibiscusking.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hibiscusking
 * @since 2022-10-24
 */
public interface PermissionMapper extends BaseMapper<Permission> {

    Permission findBySn(String sn);

    List<Permission> findByPermId(List<Long> permissionsId);

    void addMiddlePermission(@Param("id") Long id, @Param("permissions") List<Long> permissions);

    List<String> findByLoginId(Long id);
}
